#include<stdio.h>
#include <math.h>
int main()
{
	int x = 0;
	scanf_s("%d", &x);
	double m = 1.0;
	double sum = 1.0;
	int tmp = 0;
	while (m >= 0.00001)
	{
		int ret1 = 1;
		int i = tmp;
		tmp++;
		while (i)
		{
			ret1 *= i;
			i--;
		}
		double ret2 = pow(x, i);
		m = ret2 * 1.0 / ret1;
		sum += m;
	}
	printf("%.6lf", sum);
	return 0;
}